let express =require("express")
let app=express()

// 后端设置跨域
app.use(function (req, res, next) { 
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Content-Type, Content.length, Authorization');
    res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, OPTIONS, DELETE');
    next();
})

let siteDay=require('./router/site-day')
let siteMouth=require('./router/site-mouth')
let siteMouthmean=require('./router/site-mouth-mean')
let cityDay=require('./router/city-day')
let siteAqi=require('./router/site-aqi-mouth')
let bayonetHour=require('./router/bayonet-hour')
let bayonetDay=require('./router/bayonet-day')

app.use('/siteday',siteDay)
app.use('/sitemouth',siteMouth)
app.use('/sitemouthmean',siteMouthmean)
app.use('/cityday',cityDay)
app.use('/siteaqi',siteAqi)
app.use('/bayonethour',bayonetHour)
app.use('/bayonetday',bayonetDay)

app.listen(80, () => {
    console.log('服务器启动成功');
})